<template>
  <div>
    <header>
      <div class="bd">
        <div class="left" @click="goBack">
          <van-icon name="arrow-left" size="20" />
        </div>
        <h2>登录</h2>
        <div class="right" @click="goPath">
          <van-icon name="home-o" size="20" />
        </div>
      </div>
    </header>
  </div>
</template>

<script>
export default {
  methods: {
    goBack() {
      this.$router.go(-1);
    },
    goPath() {
      this.$router.push("/");
    },
  },
};
</script>

<style lang="less" scoped>
header {
  .bd {
    background: #b0352f;
    //   position: fixed;
    //   height: 44px;
    //   top: 0;
    //   left: 0;
    z-index: 99;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    h2 {
      font-weight: 400;
      font-size: 16px;
    }
    .left,
    .right {
      width: 34px;
      height: 34px;
      margin: 5px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}
</style>